import i18n from '@/utils/i18n'
export const formItems = [
    {
        filed: 'userInfo',
        type: 'input',
        label: i18n.t('message.hyxx')
    },

    {
        filed: 'orderId',
        type: 'input',
        label: i18n.t('message.ddh')
    }, {
        filed: 'time',
        type: 'daterange',
        clearable: false,
        label: i18n.t('message.dcrq'),
        pickerOptions: {
            shortcuts: [{
                text: i18n.t('message.jin7'),
                onClick (picker) {
                    const end = new Date()
                    const start = new Date()
                    end.setTime(end.getTime())
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 6)
                    picker.$emit('pick', [start, end])
                }
            },
            {
                text: i18n.t('message.jin30'),
                onClick (picker) {
                    const end = new Date()
                    const start = new Date()
                    end.setTime(end.getTime())
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 29)
                    picker.$emit('pick', [start, end])
                }
            },
            {
                text: i18n.t('message.jin60'),
                onClick (picker) {
                    const end = new Date()
                    const start = new Date()
                    end.setTime(end.getTime())
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 59)
                    picker.$emit('pick', [start, end])
                }
            },
            {
                text: i18n.t('message.jin90'),
                onClick (picker) {
                    const end = new Date()
                    const start = new Date()
                    end.setTime(end.getTime())
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 89)
                    picker.$emit('pick', [start, end])
                }
            }],
            disabledDate (time) {
                var curDate = new Date(new Date().toLocaleDateString()).getTime()
                var preDate = new Date(curDate)
                return time.getTime() > preDate
            }
        }
    },
    {
        filed: 'channelType',
        type: 'select',
        label: i18n.t('message.ddly'),
        labelCode: 'name',
        options: []
    },
    {
        filed: 'payMethod',
        type: 'select',
        label: i18n.t('message.zffs'),
        labelCode: 'name',
        options: []
    },
    {
        filed: 'payStatus',
        type: 'select',
        label: i18n.t('message.ddzt'),
        options: [
            // { value: '0', label: i18n.t('message.wzf') },
            // { value: '1', label: i18n.t('message.gqwf') },
            // { value: '2', label: i18n.t('message.yqx') },
            { value: '3', label: i18n.t('message.zfcg') },
            // { value: '4', label: i18n.t('message.tkz') },
            { value: '5', label: i18n.t('message.tkcg') }]
    },
    {
        filed: 'editorName',
        type: 'input',
        label: i18n.t('message.czr')
    }
]
export const queryFormConfig = {
    formItems,
    online: true
}
